import React, { Component } from 'react';
import {mainStyle} from '../assets/css/mainCss';
import List from './page/homeList';
import {
    Platform,
    StyleSheet,
    Text,
    View,
    Button,
    TextInput,
    Dimensions
  } from 'react-native';


  const styles=StyleSheet.create({
      inputItem:{
        borderRadius:100,
        width:Dimensions.get('window').width-100,
        backgroundColor:'#fff',
        marginLeft:20,
        height:40,
        paddingVertical:4
      },
      content: { 
        flex: 1, 
        flexDirection: 'row', 
        justifyContent: 'center', 
        alignItems: 'center' ,
        height:80,
    },
    center:{
        justifyContent: 'center', 
        // alignItems: 'center' 
    },
    city:{
        fontSize:15,
        color:'#333'
    }
  })
export class HomeScreen extends React.Component {
    render() {
        const { navigate } = this.props.navigation;

        return (//首页头部
            <View style={{flex:1}}>
                <View style={[mainStyle.mainColor,styles.content]}>
                    <View style={[styles.inputItem,styles.center,{paddingLeft:5,flex:4,flexDirection: 'row'}]}>
                        <Text style={[styles.city,{flex:1,marginTop:6,}]}>上海</Text>
                        <TextInput underlineColorAndroid="transparent" placeholder='请输入关键词' placeholderTextColor="#999" style={{paddingVertical:4,flex:4,fontSize:15}}></TextInput>
                    </View>
                    <Text style={{flex:1,marginLeft:8,color:"#fff",fontWeight:'bold',fontSize:15}}>签到</Text>
                </View>
                <View style={{flex:6}}>
                    <List></List>
                </View>
            </View>
        );
    }
    goOtherPage(){
        
    }
}